using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using ERP.OrderManage.Dtos;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;

namespace ERP.OrderManage
{
    /// <summary>
    /// 销售送货订单服务接口
    /// </summary>
    public interface ISaleSendOrderService : IApplicationService
    {
        /// <summary>
        /// 获取销售送货订单分页列表
        /// </summary>
        Task<PagedResultDto<SaleSendOrderDto>> GetListAsync(GetSaleSendOrderInputDto input);

        /// <summary>
        /// 获取销售送货订单详情
        /// </summary>
        Task<SaleSendOrderDto> GetAsync(int id);

        /// <summary>
        /// 创建销售送货订单
        /// </summary>
        Task<SaleSendOrderDto> CreateAsync(CreateSaleSendOrderDto input);

        /// <summary>
        /// 更新销售送货订单
        /// </summary>
        Task<SaleSendOrderDto> UpdateAsync(int id, UpdateSaleSendOrderDto input);

        /// <summary>
        /// 删除销售送货订单
        /// </summary>
        Task DeleteAsync(int id);

        /// <summary>
        /// 生成订单编码
        /// </summary>
        Task<string> GenerateOrderCodeAsync();

        /// <summary>
        /// 添加订单明细
        /// </summary>
        Task<SaleSendOrderDetailDto> CreateOrderDetailAsync(CreateSaleSendOrderDetailDto input);

        /// <summary>
        /// 更新订单明细
        /// </summary>
        Task<SaleSendOrderDetailDto> UpdateOrderDetailAsync(int detailId, UpdateSaleSendOrderDetailDto input);

        /// <summary>
        /// 删除订单明细
        /// </summary>
        Task DeleteOrderDetailAsync(int detailId);

        /// <summary>
        /// 获取订单明细列表
        /// </summary>
        Task<List<SaleSendOrderDetailDto>> GetOrderDetailsAsync(int saleSendOrderId);

        /// <summary>
        /// 确认订单
        /// </summary>
        Task<SaleSendOrderDto> ConfirmOrderAsync(int id);

        /// <summary>
        /// 提交审批
        /// </summary>
        Task<SaleSendOrderDto> SubmitForApprovalAsync(int id);

        /// <summary>
        /// 审批通过
        /// </summary>
        Task<SaleSendOrderDto> ApproveOrderAsync(int id);

        /// <summary>
        /// 审批拒绝
        /// </summary>
        Task<SaleSendOrderDto> RejectOrderAsync(int id);

        /// <summary>
        /// 导出订单
        /// </summary>
        Task<byte[]> ExportAsync(GetSaleSendOrderInputDto input);

        /// <summary>
        /// 获取产品选择列表
        /// </summary>
        Task<PagedResultDto<ProductSelectDto>> GetProductsForSelectAsync(GetProductSelectInputDto input);

        /// <summary>
        /// 获取客户选择列表
        /// </summary>
        Task<PagedResultDto<CustomerSelectDto>> GetCustomersForSelectAsync(GetCustomerSelectInputDto input);

        /// <summary>
        /// 获取仓库选择列表
        /// </summary>
        Task<List<WarehouseSelectDto>> GetWarehousesForSelectAsync();

        /// <summary>
        /// 从销售订单导入数据
        /// </summary>
        Task<List<SaleSendOrderDetailDto>> ImportFromSaleOrderAsync(int saleOrderId, int saleSendOrderId);
    }
} 